module.exports = {
  title: 'Happy UI',
  description: '一个vue3组件库',

  themeConfig: {
    logo: '/logo.svg',
    repo: 'zenquan/happy-ui',
    docsDir: 'docs',

    editLinks: true,
    editLinkText: 'Edit this page on GitHub',
    lastUpdated: 'Last Updated',

    // algolia: {
    //   apiKey: '2f718a59604e9431f0b229f0f76f8cb2',
    //   indexName: 'happy-ui'
    // },

    nav: [
      { text: '首页', link: '/' },
      {
        text: '组件',
        link: '/components/button',
        activeMatch: '^/components'
      },
    ],

    sidebar: {
      '/components/': getComponentsSidebar(),
    }
  }
}

function getComponentsSidebar() {
  return [
    {
      text: '组件',
      children: [
        { text: '安装', link: '/components/install' },
        { text: 'Button 按钮', link: '/components/button' },
        { text: 'Dialog 弹窗', link: '/components/dialog' },
        { text: 'Popup 弹出层', link: '/components/popup' },
        { text: 'Lazyload 图片懒加载', link: '/components/lazyload' },
      ]
    }
  ]
}
